<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>filedownloader.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">filedownloader.js</span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    A class for downloading remote files and storing them
 locally using the HTML5 FileSystem API.

 The directory structure is of the form /HASH/URL/BASENAME:

 The HASH portion is a three-character slice of the hash of the URL. Since the
 filesystem has a limit of about 5000 files per directory, this should divide
 the downloads roughly evenly among about 5000 directories, thus allowing for
 at most 5000^2 downloads.

 The URL portion is the (sanitized) full URL used for downloading the file.
 This is used to ensure that each file ends up in a different location, even
 if the HASH and BASENAME are the same.

 The BASENAME portion is the basename of the URL. It's used for the filename
 proper so that the local filesystem: URL will be downloaded to a file with a
 recognizable name.
  </div>
  

        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="closure_goog_net_filedownloader.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/closure/goog/net/filedownloader.js">Git</a></li>
          </ol>
        </div>
</div>

<h2 class="g-first">File Location</h2>
  <div class="g-section g-tpl-20-80">
    <div class="g-unit g-first">
      <div class="g-c-cell code-label">net/filedownloader.js</div>
    </div>
  </div>
<hr/>


  <h2>Classes</h2>
 <div class="fn-constructor">
        <a href="class_goog_net_FileDownloader.html">
          goog.net.FileDownloader</a><br/>
        <div class="class-details">A class for downloading remote files and storing them locally using the
HTML5 filesystem API.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_net_FileDownloader_Download_.html">
          goog.net.FileDownloader.Download_</a><br/>
        <div class="class-details">A struct containing the data for a single download.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_net_FileDownloader_Error.html">
          goog.net.FileDownloader.Error</a><br/>
        <div class="class-details">The error object for FileDownloader download errors.</div>
 </div>
      









<div class="section">
  <table class="horiz-rule">


  </table>
</div>










      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Directory net</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">File Reference</h2>
            <div id="sideFileIndex" rootPath="" current="net/filedownloader.js"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
